package com.gack.business.vo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.Transient;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 
 * @author ws
 * 2018-6-14
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class EnterpriseFrameworkVO {

	private String id;//公司id
	private String name;//公司名称
	private Integer currentNumber;//公司当前人数
	private List<DepartmentBasicInfo> children = new ArrayList<>();
	
	public EnterpriseFrameworkVO(String id, String name, Integer currentNumber){
		this.id = id;
		this.name = name;
		this.currentNumber = currentNumber;
	}
	
	@Getter
	@Setter
	@NoArgsConstructor
	@AllArgsConstructor
	public static class DepartmentBasicInfo{

		private String id;//部门id
		private String name;//部门名称
		private String no;//部门编号(一级部门编号:00   二级部门编号:父部门编号+00   三级部门编号:父部门编号+00)
		private String level;//部门要分层,层级不写死,第一次0,树形结构添加.根据上一级目录添加下层部门
		private Integer number;//当前部门人数  初始为0
		private String parentId;//父部门id  无父部门则为0
		private List<DepartmentBasicInfo> children = new ArrayList<>();
		
		public DepartmentBasicInfo(String id, String name, String no, String level, Integer number, String parentId){
			this.id = id;
			this.name = name;
			this.no = no;
			this.level = level;
			this.number = number;
			this.parentId = parentId;
		}
		
	}
	
}
